

var updateOperationType = {
    0: "Created",    
    1: "Updated",
    2: "Deleted"
}

var governancePdfType = {
    0: "BusinessAndFinancialProfile",    
    1: "GovernanceDataProfile"
}


var collection = db.getSiblingDB("GovernanceInputFile").GovernancePdfProfileMetadata
collection.find({OperationType: { $type: 16 }}).forEach(function(item){

    item.OperationType = updateOperationType[item.OperationType];
    item.GovernancePdfType = governancePdfType[item.GovernancePdfType];

    collection.save(item);
})

